import * as React from 'react'; import { Link, LinkProps } from '@aws-amplify/ui-react'; import { Demo } from '@/components/Demo'; import { LinkPropControls } from './LinkPropControls'; import { useLinkProps } from './useLinkProps'; import { demoState } from '@/utils/demoState'; const propsToCode = (props: LinkProps) => { return ( '' + `\n ${props.children}\n` ); }; const defaultLinkProps = { isExternal: false, color: '#007EB9', textDecoration: 'none', children: 'My Demo Link', }; export const LinkDemo = () => { const linkProps = useLinkProps( (demoState.get(Link.displayName) as LinkProps) || defaultLinkProps ); return ( } > {linkProps.children} ); };